package com.inspur.edp.common;

import org.springframework.util.StringUtils;

import java.util.Objects;

public class ParamValidation {
    public static void checkParam(Object ... objects ){
        for(Object o: objects){
            if(Objects.isNull(o)){
                throw new RuntimeException("param is error");
            }
        }
    }

    public static void checkStringParam(String str, String strName){
        if(StringUtils.isEmpty(str)){
            throw new RuntimeException("param " + strName + " is error");
        }
    }
}
